/**
 * Created by Administrator on 2017/6/5.
 */
// import Toast from "../widget/common/Toast";
import Toast from "react-native-root-toast";

/**
 * 冒一个时间比较短的Toast
 * @param content
 */
export const toastShort = (content, shouldToast = true) => {
  shouldToast
    && Toast.show(content, {
      duration: Toast.durations.SHORT,
      position: Toast.positions.CENTER,
      shadow: true,
      animation: true,
      hideOnPress: true,
      delay: 0,
    });
};

/**
 * 冒一个时间比较久的Toast
 * @param content
 */
export const toastLong = (content, shouldToast = true) => {
  shouldToast
    && Toast.show(content, {
      duration: Toast.durations.LONG,
      position: Toast.positions.CENTER,
      shadow: true,
      animation: true,
      hideOnPress: true,
      delay: 0,
    });
};
